{{useCss "/app-pages/css/classify_goods_list.scss"}}
<div class="classify_title">
	{{#each $Cache.classify_goods_list.classify_detail.parent_classify_list}}
		<href to="/classify_goods_list.html?id={{_id}}">
			{{classify_name}}
		</href>
		&gt;
	{{/each}}
	<href to="/classify_goods_list.html?id={{$Cache.classify_goods_list.classify_detail.current_classify._id}}">
		{{$Cache.classify_goods_list.classify_detail.current_classify.classify_name}}
	</href>
</div>

{{#if $Cache.classify_goods_list.classify_detail.child_classify_list.length}}
<div class="classify_childs">
	{{#each $Cache.classify_goods_list.classify_detail.child_classify_list}}
		{{#if !$Top.$Cache.classify_goods_list.classify_detail.parent_classify_list.length}}
		<href class="item" to="/classify_goods_list.html?id={{_id}}">{{classify_name}}</href>
		{{#else}}
		<href class="item {{($Top.$Cache.classify_goods_list.goods_id==_id)&&'focus'}}" to="/classify_goods_list.html?id={{$Top.$Cache.classify_goods_list.classify_id}}&goods_id={{_id}}">{{classify_name}}</href>
		{{/if}}
	{{/each}}
</div>
<hr />
{{/if}}

<div class="goods_list">
{{#if !$Cache.classify_goods_list.is_loading}}
	<div class="listitem">
	    <i class="icon-spin4">正在加载数据</i>
	</div>
{{#else}}
	{{#each $Cache.classify_goods_list.goods_list}}
	<div class="listitem">
	    <div class="goodsimg">
	        <a event-click="{{'$Top.$Event.classify_goods_list.jump_to_details'}}">
	            <img bind-src="{{preview_img_url}}?imageView/1/w/250/h/250" />
	        </a>
	    </div>
	    <div class="box">
	        <div class="addcart">
	            <div class="price_box">
	                <div class="item">￥{{#Fixed cash}}</div>
	                {{#if original_price}}
	                <div class="item">
	                    <del>￥{{#Fixed original_price}}</del>
	                </div>
	                {{/if}}
	            </div>
	            <div class="buy_btn_box">
	                <button class="icon-basket" event-click="{{'$Top.$Event.goods_list.add_to_cart'}}">购买</button>
	            </div>
	        </div>
	        <div class="info">
	            <a>
	                <b>{{goods_name+" "}}</b>
	                {{intro}}
	            </a>
	        </div>
	    </div>
	</div>
	{{/each}}
	{{#if !$Cache.classify_goods_list.goods_list.length}}
	    <div class="listitem">
	        <i>此目录下暂没有上传商品</i>
	    </div>
	{{/if}}
{{/if}}
</div>